#pragma once
#pragma execution_character_set("UTF-8")

#include <QWidget>
#include <QPoint>
#include <QVector>
#include <qdebug.h>
#include <qmessagebox.h>
#include "ui_CaltabData.h"

#ifndef __APPLE__
#  include "HalconCpp.h"
#  include "HDevThread.h"
#  include "HImage.h"
#else
#  ifndef HC_LARGE_IMAGES
#    include <HALCONCpp/HalconCpp.h>
#    include <HALCONCpp/HDevThread.h>
#    include <HALCON/HpThread.h>
#  else
#    include <HALCONCppxl/HalconCpp.h>
#    include <HALCONCppxl/HDevThread.h>
#    include <HALCONxl/HpThread.h>
#  endif
#  include <stdio.h>
#  include <CoreFoundation/CFRunLoop.h>
#endif

using namespace HalconCpp;

class CaltabData : public QWidget
{
	Q_OBJECT

public:
	CaltabData(QWidget *parent = nullptr);
	~CaltabData();

	int NumRows = 0, MarksPerRow = 0;
	HTuple FinderRow, FinderColumn;
	double	Diameter = 0;
	
	HTuple Polarity = NULL;
	HTuple CalPlatePSFile = NULL;
	HTuple hv_CalibObjDescr = NULL;
	HTuple hv_CalibrationPlateThickness = NULL;

	QVector<QPoint> markpoint_vec;

private:
	Ui::CaltabDataClass ui;

	void HidSpinBox();

signals:
	void Create_Caltab_Sig();
	void CloseWin();

	void Message(QString type, QString message);

public slots:
	void on_btn_confirm_clicked();
	void on_btn_cancel_clicked();
	void on_sp_number_valueChanged(int number);
};
